<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateRepoTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('repo_settings', function (Blueprint $table) {
            $table->increments('id');
            $table->string('ssh_host')->comment('ssh config host');
            $table->string('repo_url')->comment('仓库地址');
            $table->integer('repo_id')->comment('仓库id');
            $table->string('app_path')->nullable()->comment('应用部署路径');
            $table->string('app_logs_path')->nullable()->comment('日志路径');
            $table->string('app_configs_path')->nullable()->comment('配置文件路径');
            $table->string('server_env')->comment('服务器部署环境');
            $table->string('default_branch')->comment('默认部署分支');
            $table->string('name')->comment('配置名，显示用');

            $table->nullableTimestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('repo_settings');
    }
}
